import http from "./http";

const getCommentList = (pageNum, pageSize) => {
  //data是参数，里面传入登录信息
  return http({
    method: "get", //请求方法
    url: "/api/admin/comment/list/" + pageNum + "/" + pageSize, //请求路径
    responseType: "json",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
};
const deleteComment = (cid) => {
  //data是参数，里面传入登录信息
  return http({
    method: "delete", //请求方法
    url: "/api/admin/comment/delete/" + cid, //请求路径
    responseType: "json",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
};
const updateComment = (v) => {
  //data是参数，里面传入登录信息
  return http({
    method: "post", //请求方法
    url: "/api/admin/comment/update", //请求路径
    data:v,
    responseType: "json",
    headers: {
      "Content-Type": "application/json",
    },
  });
};

export { getCommentList,deleteComment,updateComment };
